if LANG_ES
  ES_DIR = es
endif

if LANG_ES_UTF8
  ES_DIR_UTF8 = es.utf8
endif

if LANG_PT
  PT_DIR = pt
endif

if LANG_PT_UTF8
  PT_DIR_UTF8 = pt.utf8
endif

if LANG_PT_BR
  PT_BR_DIR = pt_BR
endif

if LANG_PT_BR_UTF8
  PT_BR_DIR_UTF8 = pt_BR.utf8
endif

if LANG_DE
  DE_DIR = de
endif

if LANG_DE_UTF8
  DE_DIR_UTF8 = de.utf8
endif

SUBDIRS = $(ES_DIR) $(ES_DIR_UTF8) $(PT_DIR) $(PT_DIR_UTF8) $(PT_BR_DIR) $(PT_BR_DIR_UTF8) $(DE_DIR) $(DE_DIR_UTF8)

info_TEXINFOS = maxima.texi
maxima_TEXINFOS = include-maxima.texi category-macros.texi Introduction.texi \
 Bugs.texi Help.texi Command.texi DataTypes.texi Constants.texi Lists.texi \
 Arrays.texi defstruct.texi Expressions.texi Operators.texi Evaluation.texi \
 Simplification.texi MathFunctions.texi Database.texi Plotting.texi \
 Input.texi Polynomials.texi Special.texi Elliptic.texi Limits.texi \
 Differentiation.texi Integration.texi Equations.texi Differential.texi \
 Numerical.texi Matrices.texi Affine.texi Itensor.texi Ctensor.texi \
 Atensor.texi Series.texi Number.texi Symmetries.texi Groups.texi \
 Runtime.texi Miscellaneous.texi Rules.texi nset.texi Function.texi \
 Program.texi Debugging.texi alt-display.texi asympa.texi \
 augmented_lagrangian.texi bitwise.texi bernstein.texi bode.texi celine.texi \
 clebsch_gordan.texi \
 cobyla.texi contrib_ode.texi descriptive.texi diag.texi distrib.texi \
 draw.texi drawdf.texi dynamics.texi engineering-format.texi \
 ezunits.texi f90.texi finance.texi \
 fractals.texi ggf.texi graphs.texi grobner.texi impdiff.texi interpol.texi \
 lapack.texi lbfgs.texi lindstedt.texi linearalgebra.texi lsquares.texi \
 minpack.texi makeOrders.texi mnewton.texi numericalio.texi opsubst.texi \
 operatingsystem.texi \
 orthopoly.texi ratpow.texi romberg.texi simplex.texi simplifications.texi solve_rec.texi \
 stats.texi stirling.texi stringproc.texi to_poly_solve.texi unit.texi \
 zeilberger.texi errormessages.texi

figurefiles = \
figures/introduction1.gif\
figures/introduction2.gif\
figures/introduction3.gif\
figures/dynamics1.png\
figures/dynamics2.png\
figures/dynamics3.png\
figures/dynamics4.png\
figures/dynamics5.png\
figures/dynamics6.png\
figures/dynamics7.png\
figures/dynamics8.png\
figures/plotdf1.gif\
figures/plotdf2.gif\
figures/plotdf3.gif\
figures/plotdf4.gif\
figures/plotdf5.gif\
figures/plotdf6.gif\
figures/plotting1.png\
figures/plotting2.png\
figures/plotting3.png\
figures/plotting4.png\
figures/plotting5.png\
figures/plotting6.png\
figures/plotting7.png\
figures/plotting8.png\
figures/plotting9.png\
figures/plotting10.png\
figures/plotting11.png\
figures/plotting12.png\
figures/plotting13.png\
figures/plotting14.png\
figures/plotting15.png\
figures/plotting16.png\
figures/plotting17.png\
figures/plotting18.png\
figures/plotting19.png\
figures/plotting20.png\
figures/plotting21.png\
figures/plotting22.png\
figures/plotting23.png\
figures/plotting24.png\
figures/plotting25.png\
figures/plotting26.png\
figures/orthopoly1.gif\
figures/graphs01.gif\
figures/graphs02.gif\
figures/graphs03.gif\
figures/graphs04.gif\
figures/graphs05.gif\
figures/graphs06.gif\
figures/graphs07.gif\
figures/graphs08.gif\
figures/graphs09.gif\
figures/graphs10.gif\
figures/graphs11.gif\
figures/graphs12.gif\
figures/graphs13.gif\
figures/graphs14.gif\
figures/graphs15.gif\
figures/favicon.ico\
figures/bodegain1.gif\
figures/bodegain2.gif\
figures/bodegain3.gif\
figures/bodegain4.gif\
figures/bodegain5.gif\
figures/bodegain6.gif\
figures/bodegain7.gif\
figures/bodegain8.gif\
figures/bodephase1.gif\
figures/bodephase2.gif\
figures/bodephase3.gif\
figures/bodephase4.gif\
figures/bodephase5.gif\
figures/bodephase6.gif\
figures/bodephase7.gif\
figures/bodephase8.gif\
figures/bodephase9.gif\
figures/scene1.png\
figures/scene2.png\
figures/color_terminal.png\
figures/draw_allocation.gif\
figures/draw_allocation2.gif\
figures/draw_axis3d.gif\
figures/draw_axis_bottom.gif\
figures/draw_bars.gif\
figures/draw_border.gif\
figures/draw_cbrange.gif\
figures/draw_cbtics.gif\
figures/draw_colorbox2.gif\
figures/draw_colorbox.gif\
figures/draw_color.gif\
figures/draw_color2.gif\
figures/draw_columns.gif\
figures/draw_contour2.gif\
figures/draw_contour.gif\
figures/draw_cylindrical.gif\
figures/draw_elevation_grid.gif\
figures/draw_ellipse.gif\
figures/draw_enhanced3d10.gif\
figures/draw_enhanced3d11.gif\
figures/draw_enhanced3d2.gif\
figures/draw_enhanced3d3.gif\
figures/draw_enhanced3d4.gif\
figures/draw_enhanced3d5.gif\
figures/draw_enhanced3d6.gif\
figures/draw_enhanced3d7.gif\
figures/draw_enhanced3d8.gif\
figures/draw_enhanced3d9.gif\
figures/draw_enhanced3d.gif\
figures/draw_equiv.gif\
figures/draw_errors2.gif\
figures/draw_errors.gif\
figures/draw_explicit2.gif\
figures/draw_explicit3.gif\
figures/draw_explicit.gif\
figures/draw_filledfunc2.gif\
figures/draw_filledfunc.gif\
figures/draw_grid2.gif\
figures/draw_grid.gif\
figures/draw_head_angle.gif\
figures/draw_head_both.gif\
figures/draw_head_length.gif\
figures/draw_head_type.gif\
figures/draw_image2.gif\
figures/draw_image3.gif\
figures/draw_image4.gif\
figures/draw_image5.gif\
figures/draw_image6.gif\
figures/draw_image.gif\
figures/draw_implicit2.gif\
figures/draw_implicit.gif\
figures/draw_interpolate_color2.gif\
figures/draw_interpolate_color3.gif\
figures/draw_interpolate_color4.gif\
figures/draw_interpolate_color5.gif\
figures/draw_interpolate_color6.gif\
figures/draw_interpolate_color.gif\
figures/draw_key.gif\
figures/draw_key_label_alignment.gif\
figures/draw_key_label_orientation.gif\
figures/draw_key_pos2.gif\
figures/draw_key_pos.gif\
figures/draw_label2.gif\
figures/draw_label_alignment.gif\
figures/draw_label.gif\
figures/draw_label_orientation.gif\
figures/draw_line_type.gif\
figures/draw_line_width.gif\
figures/draw_logcb.gif\
figures/draw_logx_secondary.gif\
figures/draw_mesh2.gif\
figures/draw_mesh3.gif\
figures/draw_mesh.gif\
figures/draw_multiplot.png\
figures/draw_nticks.gif\
figures/draw_palette2.gif\
figures/draw_palette3.gif\
figures/draw_palette4.gif\
figures/draw_palette5.gif\
figures/draw_palette.gif\
figures/draw_parametric3.gif\
figures/draw_parametric2.gif\
figures/draw_parametric.gif\
figures/draw_points2.gif\
figures/draw_points3.gif\
figures/draw_points4.gif\
figures/draw_points5.gif\
figures/draw_points6.gif\
figures/draw_points7.gif\
figures/draw_points8.gif\
figures/draw_point_size.gif\
figures/draw_points_joined.gif\
figures/draw_points.gif\
figures/draw_point_type.gif\
figures/draw_polygon.gif\
figures/draw_polar.gif\
figures/draw_proportional_axis2.gif\
figures/draw_proportional_axis.gif\
figures/draw_quadrilateral.gif\
figures/draw_rectangle.gif\
figures/draw_region.gif\
figures/draw_scene.gif\
figures/draw_spherical.gif\
figures/draw_surface_hide.gif\
figures/draw_title.gif\
figures/draw_transform2.gif\
figures/draw_transparent.gif\
figures/draw_triangle.gif\
figures/draw_tube_extremes.gif\
figures/draw_tube.gif\
figures/draw_unit_vectors.gif\
figures/draw_user_preamble.gif\
figures/draw_user_preamble2.gif\
figures/draw_vector2.gif\
figures/draw_vector.gif\
figures/draw_view2.gif\
figures/draw_view.gif\
figures/draw_wired_surface.gif\
figures/draw_xaxis.gif\
figures/draw_xaxis_secondary.gif\
figures/draw_xugrid.gif\
figures/draw_ylabel_secondary.gif\
figures/draw_transform.gif\
figures/worldmap_make_poly_continent.gif\
figures/worldmap_make_poly_continent2.gif\
figures/worldmap_make_poly_country.gif\
figures/worldmap_make_polygon.gif\
figures/worldmap_region_boundaries.gif\
figures/worldmap_region_boundaries_plus.gif\
figures/worldmap_geomap.gif\
figures/worldmap_geomap2.gif\
figures/worldmap_geomap3.gif\
figures/worldmap_geomap4.gif\
figures/worldmap_geomap5.gif\
figures/worldmap_geomap6.gif

pdffigures = \
figures/introduction1.pdf\
figures/introduction2.pdf\
figures/introduction3.pdf\
figures/dynamics1.pdf\
figures/dynamics2.pdf\
figures/dynamics3.pdf\
figures/dynamics4.pdf\
figures/dynamics5.pdf\
figures/dynamics6.pdf\
figures/dynamics7.pdf\
figures/dynamics8.pdf\
figures/plotdf1.pdf\
figures/plotdf2.pdf\
figures/plotdf3.pdf\
figures/plotdf4.pdf\
figures/plotdf5.pdf\
figures/plotdf6.pdf\
figures/plotting1.pdf\
figures/plotting2.pdf\
figures/plotting3.pdf\
figures/plotting4.pdf\
figures/plotting5.pdf\
figures/plotting6.pdf\
figures/plotting7.pdf\
figures/plotting8.pdf\
figures/plotting9.pdf\
figures/plotting10.pdf\
figures/plotting11.pdf\
figures/plotting12.pdf\
figures/plotting13.pdf\
figures/plotting14.pdf\
figures/plotting15.pdf\
figures/plotting16.pdf\
figures/plotting17.pdf\
figures/plotting18.pdf\
figures/plotting19.pdf\
figures/plotting20.pdf\
figures/plotting21.pdf\
figures/plotting22.pdf\
figures/plotting23.pdf\
figures/plotting24.pdf\
figures/plotting25.pdf\
figures/plotting26.pdf\
figures/orthopoly1.pdf\
figures/graphs01.pdf\
figures/graphs02.pdf\
figures/graphs03.pdf\
figures/graphs04.pdf\
figures/graphs05.pdf\
figures/graphs06.pdf\
figures/graphs07.pdf\
figures/graphs08.pdf\
figures/graphs09.pdf\
figures/graphs10.pdf\
figures/graphs11.pdf\
figures/graphs12.pdf\
figures/graphs13.pdf\
figures/graphs14.pdf\
figures/graphs15.pdf\
figures/bodegain1.pdf\
figures/bodegain2.pdf\
figures/bodegain3.pdf\
figures/bodegain4.pdf\
figures/bodegain5.pdf\
figures/bodegain6.pdf\
figures/bodegain7.pdf\
figures/bodegain8.pdf\
figures/bodephase1.pdf\
figures/bodephase2.pdf\
figures/bodephase3.pdf\
figures/bodephase4.pdf\
figures/bodephase5.pdf\
figures/bodephase6.pdf\
figures/bodephase7.pdf\
figures/bodephase8.pdf\
figures/bodephase9.pdf\
figures/scene1.pdf\
figures/scene2.pdf\
figures/color_terminal.pdf\
figures/draw_allocation.pdf\
figures/draw_allocation2.pdf\
figures/draw_axis3d.pdf\
figures/draw_axis_bottom.pdf\
figures/draw_bars.pdf\
figures/draw_border.pdf\
figures/draw_cbrange.pdf\
figures/draw_cbtics.pdf\
figures/draw_colorbox2.pdf\
figures/draw_colorbox.pdf\
figures/draw_color.pdf\
figures/draw_color2.pdf\
figures/draw_columns.pdf\
figures/draw_contour2.pdf\
figures/draw_contour.pdf\
figures/draw_cylindrical.pdf\
figures/draw_elevation_grid.pdf\
figures/draw_ellipse.pdf\
figures/draw_enhanced3d10.pdf\
figures/draw_enhanced3d11.pdf\
figures/draw_enhanced3d2.pdf\
figures/draw_enhanced3d3.pdf\
figures/draw_enhanced3d4.pdf\
figures/draw_enhanced3d5.pdf\
figures/draw_enhanced3d6.pdf\
figures/draw_enhanced3d7.pdf\
figures/draw_enhanced3d8.pdf\
figures/draw_enhanced3d9.pdf\
figures/draw_enhanced3d.pdf\
figures/draw_equiv.pdf\
figures/draw_errors2.pdf\
figures/draw_errors.pdf\
figures/draw_explicit2.pdf\
figures/draw_explicit3.pdf\
figures/draw_explicit.pdf\
figures/draw_filledfunc2.pdf\
figures/draw_filledfunc.pdf\
figures/draw_grid2.pdf\
figures/draw_grid.pdf\
figures/draw_head_angle.pdf\
figures/draw_head_both.pdf\
figures/draw_head_length.pdf\
figures/draw_head_type.pdf\
figures/draw_image2.pdf\
figures/draw_image3.pdf\
figures/draw_image4.pdf\
figures/draw_image5.pdf\
figures/draw_image6.pdf\
figures/draw_image.pdf\
figures/draw_implicit2.pdf\
figures/draw_implicit.pdf\
figures/draw_interpolate_color2.pdf\
figures/draw_interpolate_color3.pdf\
figures/draw_interpolate_color4.pdf\
figures/draw_interpolate_color5.pdf\
figures/draw_interpolate_color6.pdf\
figures/draw_interpolate_color.pdf\
figures/draw_key.pdf\
figures/draw_key_label_alignment.pdf\
figures/draw_key_label_orientation.pdf\
figures/draw_key_pos2.pdf\
figures/draw_key_pos.pdf\
figures/draw_label2.pdf\
figures/draw_label_alignment.pdf\
figures/draw_label.pdf\
figures/draw_label_orientation.pdf\
figures/draw_line_type.pdf\
figures/draw_line_width.pdf\
figures/draw_logcb.pdf\
figures/draw_logx_secondary.pdf\
figures/draw_mesh2.pdf\
figures/draw_mesh3.pdf\
figures/draw_mesh.pdf\
figures/draw_multiplot.pdf\
figures/draw_nticks.pdf\
figures/draw_palette2.pdf\
figures/draw_palette3.pdf\
figures/draw_palette4.pdf\
figures/draw_palette5.pdf\
figures/draw_palette.pdf\
figures/draw_parametric3.pdf\
figures/draw_parametric2.pdf\
figures/draw_parametric.pdf\
figures/draw_points2.pdf\
figures/draw_points3.pdf\
figures/draw_points4.pdf\
figures/draw_points5.pdf\
figures/draw_points6.pdf\
figures/draw_points7.pdf\
figures/draw_points8.pdf\
figures/draw_point_size.pdf\
figures/draw_points_joined.pdf\
figures/draw_points.pdf\
figures/draw_point_type.pdf\
figures/draw_polygon.pdf\
figures/draw_polar.pdf\
figures/draw_proportional_axis2.pdf\
figures/draw_proportional_axis.pdf\
figures/draw_quadrilateral.pdf\
figures/draw_rectangle.pdf\
figures/draw_region.pdf\
figures/draw_scene.pdf\
figures/draw_spherical.pdf\
figures/draw_surface_hide.pdf\
figures/draw_title.pdf\
figures/draw_transform2.pdf\
figures/draw_transparent.pdf\
figures/draw_triangle.pdf\
figures/draw_tube_extremes.pdf\
figures/draw_tube.pdf\
figures/draw_unit_vectors.pdf\
figures/draw_user_preamble.pdf\
figures/draw_user_preamble2.pdf\
figures/draw_vector2.pdf\
figures/draw_vector.pdf\
figures/draw_view2.pdf\
figures/draw_view.pdf\
figures/draw_wired_surface.pdf\
figures/draw_xaxis.pdf\
figures/draw_xaxis_secondary.pdf\
figures/draw_xugrid.pdf\
figures/draw_ylabel_secondary.pdf\
figures/draw_transform.pdf\
figures/worldmap_make_poly_continent.pdf\
figures/worldmap_make_poly_continent.pdf\
figures/worldmap_make_poly_continent.pdf\
figures/worldmap_make_poly_continent2.pdf\
figures/worldmap_make_poly_country.pdf\
figures/worldmap_make_polygon.pdf\
figures/worldmap_region_boundaries.pdf\
figures/worldmap_region_boundaries_plus.pdf\
figures/worldmap_geomap.pdf\
figures/worldmap_geomap2.pdf\
figures/worldmap_geomap3.pdf\
figures/worldmap_geomap4.pdf\
figures/worldmap_geomap5.pdf\
figures/worldmap_geomap6.pdf

macfiles = figures/draw_allocation2.mac figures/draw_allocation.mac figures/draw_axis3d.mac figures/draw_axis_bottom.mac figures/draw_bars.mac figures/draw_border.mac figures/draw_cbrange.mac figures/draw_cbtics.mac figures/draw_colorbox2.mac figures/draw_colorbox.mac figures/draw_color.mac figures/draw_columns.mac figures/draw_contour2.mac figures/draw_contour.mac figures/draw_cylindrical.mac figures/draw_elevation_grid.mac figures/draw_ellipse.mac figures/draw_enhanced3d10.mac figures/draw_enhanced3d11.mac figures/draw_enhanced3d2.mac figures/draw_enhanced3d3.mac figures/draw_enhanced3d4.mac figures/draw_enhanced3d5.mac figures/draw_enhanced3d6.mac figures/draw_enhanced3d7.mac figures/draw_enhanced3d8.mac figures/draw_enhanced3d9.mac figures/draw_enhanced3d.mac figures/draw_equiv.mac figures/draw_errors2.mac figures/draw_errors.mac figures/draw_explicit2.mac figures/draw_explicit3.mac figures/draw_explicit.mac figures/draw_filledfunc2.mac figures/draw_filledfunc.mac figures/draw_grid2.mac figures/draw_grid.mac figures/draw_head_angle.mac figures/draw_head_both.mac figures/draw_head_length.mac figures/draw_head_type.mac figures/draw_image2.mac figures/draw_image3.mac figures/draw_image4.mac figures/draw_image5.mac figures/draw_image6.mac figures/draw_image.mac figures/draw_implicit2.mac figures/draw_implicit.mac figures/draw_interpolate_color2.mac figures/draw_interpolate_color3.mac figures/draw_interpolate_color4.mac figures/draw_interpolate_color5.mac figures/draw_interpolate_color6.mac figures/draw_interpolate_color.mac figures/draw_key.mac figures/draw_key_pos2.mac figures/draw_key_pos.mac figures/draw_label2.mac figures/draw_label_alignment.mac figures/draw_label.mac figures/draw_label_orientation.mac figures/draw_line_type.mac figures/draw_line_width.mac figures/draw_logcb.mac figures/draw_logx_secondary.mac figures/draw_mesh2.mac figures/draw_mesh3.mac figures/draw_mesh.mac figures/draw_nticks.mac figures/draw_palette2.mac figures/draw_palette3.mac figures/draw_palette4.mac figures/draw_palette5.mac figures/draw_palette.mac figures/draw_parametric2.mac figures/draw_parametric3.mac figures/draw_parametric.mac figures/draw_points2.mac figures/draw_points3.mac figures/draw_points4.mac figures/draw_points5.mac figures/draw_points6.mac figures/draw_points7.mac figures/draw_points8.mac figures/draw_point_size.mac figures/draw_points_joined.mac figures/draw_points.mac figures/draw_point_type.mac figures/draw_polar.mac figures/draw_polygon.mac figures/draw_proportional_axis2.mac figures/draw_proportional_axis.mac figures/draw_quadrilateral.mac figures/draw_rectangle.mac figures/draw_region.mac figures/draw_scene.mac figures/draw_spherical.mac figures/draw_surface_hide.mac figures/draw_title.mac figures/draw_transform2.mac figures/draw_transform.mac figures/draw_transparent.mac figures/draw_triangle.mac figures/draw_tube_extremes.mac figures/draw_tube.mac figures/draw_unit_vectors.mac figures/draw_user_preamble2.mac figures/draw_user_preamble.mac figures/draw_vector2.mac figures/draw_vector.mac figures/draw_view2.mac figures/draw_view.mac figures/draw_wired_surface.mac figures/draw_xaxis.mac figures/draw_xaxis_secondary.mac figures/draw_xugrid.mac figures/draw_ylabel_secondary.mac figures/worldmap_geomap2.mac figures/worldmap_geomap3.mac figures/worldmap_geomap4.mac figures/worldmap_geomap5.mac figures/worldmap_geomap6.mac figures/worldmap_geomap.mac figures/worldmap_make_poly_continent2.mac figures/worldmap_make_poly_continent.mac figures/worldmap_make_poly_country.mac figures/worldmap_make_polygon.mac figures/worldmap_region_boundaries.mac figures/worldmap_region_boundaries_plus.mac



if CHM
MAXIMA_CHM = maxima.chm
INSTALL_CHM = install-chm
UNINSTALL_CHM = uninstall-chm
CLEAN_CHM = clean-chm
endif

# We need the html docu to be generated on "make all" because if we fail
# to do so a "sudo make install" will generate the html docu as read-only
# fails conflicting with a subsequent "make html".
all-local: html maxima.info maxima-index.lisp $(MAXIMA_CHM)

maxima.info: $(top_srcdir)/doc/info/maxima.texi
	$(MAKEINFO) --split-size=1000000 $<

html: maxima.html contents.hhc

maxima-index.lisp: maxima.info build_index.pl
	perl ./build_index.pl maxima.info ':crlf' > maxima-index.lisp

maxima.html: maxima.texi $(maxima_TEXINFOS) $(figurefiles) manual.css
	sh extract_categories.sh maxima

maxima.epub: maxima.html
	ebook-convert maxima_singlepage.html maxima.epub --breadth-first "--title=Maxima @manual_version@ Manual" "--authors=Maxima Team" --language=en

maxima.pdf: $(top_srcdir)/doc/info/maxima_pdf.texi $(top_srcdir)/doc/info/maxima.texi $(maxima_TEXINFOS) $(pdffigures)
	$(TEXI2PDF) $(AM_V_texinfo) -o $@ $<
	rm -f maxima_pdf.fns maxima_pdf.vr maxima_pdf.toc maxima_pdf.fn maxima_pdf.aux maxima_pdf.log maxima_pdf.vrs

contents.hhc index.hhk: maxima.html
	perl ./create_index

# Squash error on exit from hhc
maxima.chm: maxima.hhp contents.hhc index.hhk
	-"$(HHC)" maxima.hhp

include $(top_srcdir)/common.mk
genericdir = $(dochtmldir)
genericdirDATA = $(figurefiles) \
contents.hhc index.hhk header.hhp maxima.hhp

htmlname = maxima
htmlinstdir = $(dochtmldir)
include $(top_srcdir)/common-html.mk

all-local: warn_texinfo
dist-hook: check_texinfo html

install-data-local: install-maxima-index $(INSTALL_CHM)
uninstall-local: uninstall-maxima-index $(UNINSTALL_CHM)

install-maxima-index: maxima-index.lisp
	test -z "$(infodir)" || mkdir -p -- "$(DESTDIR)$(infodir)"
	$(INSTALL_DATA) maxima-index.lisp "$(DESTDIR)$(infodir)/maxima-index.lisp"

uninstall-maxima-index: maxima-index.lisp
	rm -f "$(DESTDIR)$(infodir)/maxima-index.lisp"

clean-local: clean-info clean-html $(CLEAN_CHM)

clean-info:
	rm -f maxima.info*
	rm -f maxima-index.lisp
	rm -f maxima.fns

clean-html:
	rm -f maxima*.html
	rm -f contents.hhc
	rm -f index.hhk
	rm -f maxima.chm

if CHM
install-chm: maxima.chm
	test -z "$(DESTDIR)$(docchmdir)" || mkdir -p -- "$(DESTDIR)$(docchmdir)"
	$(INSTALL_DATA) maxima.chm "$(DESTDIR)$(docchmdir)/maxima.chm"

uninstall-chm:
	rm -f "$(DESTDIR)$(docchmdir)"

clean-chm:
	rm -f maxima.chm
	rm -rf chm
endif

EXTRA_DIST = texi2html manual.css texi2html.init \
    $(genericdirDATA) $(pdffigures) $(macfiles) \
    create_index build_index.pl maxima-index.lisp docdraw.mac \
    extract_categories1.awk extract_categories1.sed extract_categories.sh check_tab fix_tab \
    figures/Makefile.am figures/Makefile.in figures/README \
    maxima-init.lisp mmref.tex README.update_examples maxima_pdf.texi \
    figures/orthopoly1.ps.gz figures/plotdf1.ps.gz figures/plotdf2.ps.gz figures/plotdf3.ps.gz figures/plotdf4.ps.gz figures/plotdf5.ps.gz figures/plotdf6.ps.gz

check_texinfo:
	@pattern=`printf "\t"` ; \
	bad_files=`find . -name '*.texi' -print | xargs $(EGREP) -l -e "$$pattern"` ; \
	[ -z  "$$bad_files" ] || ( echo "ERROR: The following files have unexpanded Tabs: $$bad_files" ; \
	echo "Run make distclean and then /doc/info/fix_tab to fix the problem." ; exit 1 )

warn_texinfo:
	@pattern=`printf "\t"` ; \
	bad_files=`find . -name '*.texi' -print | xargs $(EGREP) -l -e "$$pattern"` ; \
	[ -z  "$$bad_files" ] || ( echo "WARNING: The following files have unexpanded Tabs: $$bad_files" ; \
	echo "Run /doc/info/fix_tab to fix the problem." )



.PHONY: check_texinfo warn_texinfo
